UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6Gn1FiReeuy/WamSv40oCxH6K0xpVywsR+C/QmkDJxo='
WHERE
key_id = '55515ab494bcda2860de5300e83dbc779a5f3d53c3c49addfd7d878b35c6688f'
AND (
token = '6Gn1FiReeuy/WamSv40oCxH6K0xpVywsR+C/QmkDJxo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)