UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'KdfRYkwcChkbTilOEg/PlUrEgfozahsR/9OXzf6v0OI='
WHERE
key_id = '6d63d8e83910801524e79d39cdd92a002c4702ea968bdcc9cfaeba6aeb5ddaf1'
AND (
token = 'KdfRYkwcChkbTilOEg/PlUrEgfozahsR/9OXzf6v0OI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)