UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PVC/Wq0ky7FtFX1GD55mq25kyChQDL+8ELSrkBSjx5Q='
WHERE
key_id = '5894457393a5b52336a839cf3079273ce57307b634447781f610f3b3de53424c'
AND (
token = 'PVC/Wq0ky7FtFX1GD55mq25kyChQDL+8ELSrkBSjx5Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)