UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cEUolFSMVDPiaOuv+ptC/C73/ZqYXDL4Q0uu1IRc3Uc='
WHERE
key_id = '9fc6e51a31756ed457fb9de18fbd69b9e0e087cb42a8e6ad19ba9ecf1321ebb8'
AND (
token = 'cEUolFSMVDPiaOuv+ptC/C73/ZqYXDL4Q0uu1IRc3Uc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)