UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Dp27/MzL6zoAejJAVENXNWYRrTKwmIEEbrh1ElBj7nw='
WHERE
key_id = '1462d6ab2542684843899c595614b7ec1397ced276e4a503fad30681ad34a277'
AND (
token = 'Dp27/MzL6zoAejJAVENXNWYRrTKwmIEEbrh1ElBj7nw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)