UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zbXuEPtigSB53kFhrU0xS5gEJGOiWvEJoxScrLu0+B0='
WHERE
key_id = 'a0ef88a29d5e0deb7aaaf54d9ccc13510648f1c83af39b9b40b532a47db34bf9'
AND (
token = 'zbXuEPtigSB53kFhrU0xS5gEJGOiWvEJoxScrLu0+B0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)