UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pcuEPkkBMI5H/BRG/lO+PPJoiOqrh3ZxYX+vn08OhXE='
WHERE
key_id = '492ffe84b6dd35b31dda14760c79dc4f88a6f29f9f7cd43abbb032e68e4b2695'
AND (
token = 'pcuEPkkBMI5H/BRG/lO+PPJoiOqrh3ZxYX+vn08OhXE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)