UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oBmBwsgIwvgjfthT5xV/Dw3HGHkT7shHIk5aEDzz5K8='
WHERE
key_id = '12008fb4ff9dcba46b5f0ac475f23b02792ea8328d85af41afae0368fe451eb9'
AND (
token = 'oBmBwsgIwvgjfthT5xV/Dw3HGHkT7shHIk5aEDzz5K8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)