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