UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oXQ0i4s0omU5SQlBaEDxw4CmRI2nyY2xu8khOS9QGO4='
WHERE
key_id = '26e4d4ed1029f534c8b21fb785d7a46a898a3a6f23221bc7f0592a18f844a8b4'
AND (
token = 'oXQ0i4s0omU5SQlBaEDxw4CmRI2nyY2xu8khOS9QGO4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)