UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tcZzH5+Ae0nIv0rLssQVuU3NkTyTxk0NlsyL1dOSLZg='
WHERE
key_id = 'cb57cfcc9c2ac1fdb13940483cca2991affe1b53cbce30165888bb8bcc6fddba'
AND (
token = 'tcZzH5+Ae0nIv0rLssQVuU3NkTyTxk0NlsyL1dOSLZg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)