UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6+u5iAj3Nz8Gg5p6Kz9STNRuWlAv4+9itc6A8uwXq6A='
WHERE
key_id = 'b213867030962635b1979aa7223dcca52df40ef8ca332d13e06939594d607059'
AND (
token = '6+u5iAj3Nz8Gg5p6Kz9STNRuWlAv4+9itc6A8uwXq6A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)