UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'w+Sx+g0l7VLXcmojdEJrFVZnWplx9XBva38Z4ryN/sQ='
WHERE
key_id = '3177fd13e7429ad4a85717da0486bba0e45848c52ccaa32e177c43626b24013a'
AND (
token = 'w+Sx+g0l7VLXcmojdEJrFVZnWplx9XBva38Z4ryN/sQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)