UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FDKFubk4p155LkvdGXFBNvXBACYPeZC2TN2gNtiHThA='
WHERE
key_id = '2d135ad3e3a990181f690d6dcbfdbc02e6b461825549fc13c307c9f45bf67ab9'
AND (
token = 'FDKFubk4p155LkvdGXFBNvXBACYPeZC2TN2gNtiHThA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)