UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+ueRlEIg2YFsElBgtx9fA2qzErjJsywSmHdV57wxTgg='
WHERE
key_id = '8e64c88138de897c4f45584be4d5c2da9a5c31db7a2ae6a287825a6d64f79980'
AND (
token = '+ueRlEIg2YFsElBgtx9fA2qzErjJsywSmHdV57wxTgg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)