UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SK3tUPJCObKzA/+vX9HKSV9iTvUEt0rU51bdN9E5QRg='
WHERE
key_id = '1d8e83ef197cbfd61634dc2ad09649e7eb520e65a92c4b80210fea66356fff4d'
AND (
token = 'SK3tUPJCObKzA/+vX9HKSV9iTvUEt0rU51bdN9E5QRg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)