UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eXKv1DlwTJNJnEMdY38GOUbf7iYmLQetDrqXPuJX/0A='
WHERE
key_id = '43b39521abd349bb532be673d4e48768d94783d51d9ed24fbbb66a0ae04989ed'
AND (
token = 'eXKv1DlwTJNJnEMdY38GOUbf7iYmLQetDrqXPuJX/0A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)