UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'i2EVsNcmo3vDKv0jFuRkVub22uSM6jxw9NMfaliz+t8='
WHERE
key_id = '44d41077c1174605a7a3d893f57c73dcc3beefbdfebdf159b3d27fef1f32d253'
AND (
token = 'i2EVsNcmo3vDKv0jFuRkVub22uSM6jxw9NMfaliz+t8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)