UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yEP1IFaaCCM/WQVprao+8QIz7zfzHtqAqRTEmWzZt5s='
WHERE
key_id = '533e1655a96c1276ea971be17ffcd57e592f1f9eeba853b4ab2e02501e867d64'
AND (
token = 'yEP1IFaaCCM/WQVprao+8QIz7zfzHtqAqRTEmWzZt5s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)