UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'z2HVGeUFP5/ER28vMbXy+3ajUfsNkY7/o3JXfzzCwBo='
WHERE
key_id = '8eb252a242c3b9c18ac0d45c071c7dc0a39a1cc0aa5f5aff9abed69e593bace1'
AND (
token = 'z2HVGeUFP5/ER28vMbXy+3ajUfsNkY7/o3JXfzzCwBo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)