UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm5o/jAiLQFEnJ1YEB1tTxZHxZa6CDjMvwcmOMOhi5f4='
WHERE
key_id = 'c4dc3c5dd77e12ab56b9819664b66e6a43a931f310ea7754ce08e3ffb59ca3d3'
AND (
token = 'm5o/jAiLQFEnJ1YEB1tTxZHxZa6CDjMvwcmOMOhi5f4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)