UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mbiqX3X9pqdXH/IslL9tN4Gyh9Kr+T5bxH4P7JQKcIA='
WHERE
key_id = '9ed1464e4fe9ac620780182ad6902cb6e3f80c1b26ff927489f5c5ee276e2539'
AND (
token = 'mbiqX3X9pqdXH/IslL9tN4Gyh9Kr+T5bxH4P7JQKcIA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)