UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'omeiDDpNsYNYSQiRhQmF4Z0Ej6ozoH2OWQVMCkfP6Kw='
WHERE
key_id = '032336262772563e59a4bd9cc76bf0eead0c6f160de9ca04da48942e903a5c3e'
AND (
token = 'omeiDDpNsYNYSQiRhQmF4Z0Ej6ozoH2OWQVMCkfP6Kw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)