UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '78x+Dc8vOsfvSXWM08P4O0HS0ExEBxYOeiK9Qft598I='
WHERE
key_id = '7d99b2121f95da21e1ee010d8471368a7b7d332f79c417240688047206b45cb2'
AND (
token = '78x+Dc8vOsfvSXWM08P4O0HS0ExEBxYOeiK9Qft598I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)