UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V+huWLDT7+apR0+6MbRAl6+8PhtXb4PhI4VQtL/bseQ='
WHERE
key_id = '80d7ddf571f12d6bdae8ee4144f0cde3e4cbdd973edbfcb0def2f5e0f13ca823'
AND (
token = 'V+huWLDT7+apR0+6MbRAl6+8PhtXb4PhI4VQtL/bseQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)