UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HYnGtbNFa7NCjx+5ERykT/tae4/NbFqaxLRVKQQfGeY='
WHERE
key_id = '83a4860a2c9f3fcafabb931d8366260f0b47348013e7a6d8ca1d019ba4e163e4'
AND (
token = 'HYnGtbNFa7NCjx+5ERykT/tae4/NbFqaxLRVKQQfGeY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)