UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6Ru2f+sR5X2S2n6FJ6ouk60+8iV+c19UdzvdH5FC43s='
WHERE
key_id = '0b3372e569518efdb03bc695f2ed4225124fbf36d8da3f30f86b6e49da2919fd'
AND (
token = '6Ru2f+sR5X2S2n6FJ6ouk60+8iV+c19UdzvdH5FC43s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)