UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yuB1+q973QfcocSyuCWCzL2+CV3ln6Vni9FXWQSRMqY='
WHERE
key_id = '2760bf0dacad3f5166372b755b4b7006007b84c040aabcc6a6c2238f0974d94c'
AND (
token = 'yuB1+q973QfcocSyuCWCzL2+CV3ln6Vni9FXWQSRMqY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)