UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WODQrayuQ7qi5So1kCCrn0GORAI+CYc7IiLVUiotrwY='
WHERE
key_id = '937219560330fc044d6c49a3d21bd0b92dbc3328004e960451f1db663b94f431'
AND (
token = 'WODQrayuQ7qi5So1kCCrn0GORAI+CYc7IiLVUiotrwY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)